package cn.service;

import cn.dao.GradeMapper;
import cn.entity.Grade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("GradeService")
public class gradeServiceImpl implements GradeService {
    @Autowired
    private GradeMapper gradeMapper;

    public GradeMapper getGradeMapper() {
        return gradeMapper;
    }

    public void setGradeMapper(GradeMapper gradeMapper) {
        this.gradeMapper = gradeMapper;
    }


    @Override
    public List<Grade> select() {
        return gradeMapper.select();
    }

    @Override
    public int update(Grade grade) {
        return gradeMapper.update(grade);
    }

    @Override
    public int insert(Grade grade) {
        return gradeMapper.insert(grade);
    }

    @Override
    public int delete(int id) {
        return gradeMapper.delete(id);
    }

    @Override
    public List<Grade> likeSelect(String className) {
        return gradeMapper.likeSelect(className);
    }

    @Override
    public List<Grade> selectById(int cid) {
        return gradeMapper.selectById(cid);
    }

    @Override
    public List<Grade> like(Integer index, Integer size) {
        return gradeMapper.like(index,size);
    }

//    @Override
//    public List<Grade> TopSelect(int cid) {
//        return gradeMapper.TopSelect(cid);
//    }
}
